<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.17"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>CANopenNode: 301/CO_SYNC.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
  $(document).ready(function() { init_search(); });
/* @license-end */
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">CANopenNode
   </div>
  </td>
   <td>        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
</td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.17 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('CO__SYNC_8h_source.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">CO_SYNC.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="CO__SYNC_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160; </div>
<div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;<span class="preprocessor">#ifndef CO_SYNC_H</span></div>
<div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;<span class="preprocessor">#define CO_SYNC_H</span></div>
<div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160; </div>
<div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="CO__driver_8h.html">301/CO_driver.h</a>&quot;</span></div>
<div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160; </div>
<div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;<span class="comment">/* default configuration, see CO_config.h */</span></div>
<div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;<span class="preprocessor">#ifndef CO_CONFIG_SYNC</span></div>
<div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;<span class="preprocessor">#define CO_CONFIG_SYNC (CO_CONFIG_SYNC_ENABLE | CO_CONFIG_SYNC_PRODUCER)</span></div>
<div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160; </div>
<div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;<span class="preprocessor">#if ((CO_CONFIG_SYNC) &amp; CO_CONFIG_SYNC_ENABLE) || defined CO_DOXYGEN</span></div>
<div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160; </div>
<div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;<span class="preprocessor">#ifdef __cplusplus</span></div>
<div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;<span class="keyword">extern</span> <span class="stringliteral">&quot;C&quot;</span> {</div>
<div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160; </div>
<div class="line"><a name="l00075"></a><span class="lineno"><a class="line" href="structCO__SYNC__t.html">   75</a></span>&#160;<span class="keyword">typedef</span> <span class="keyword">struct</span>{</div>
<div class="line"><a name="l00076"></a><span class="lineno"><a class="line" href="structCO__SYNC__t.html#acf987cc40eb5f005a92f10210353ea1f">   76</a></span>&#160;    <a class="code" href="structCO__EM__t.html">CO_EM_t</a>            *<a class="code" href="structCO__SYNC__t.html#acf987cc40eb5f005a92f10210353ea1f">em</a>;             </div>
<div class="line"><a name="l00077"></a><span class="lineno"><a class="line" href="structCO__SYNC__t.html#a70fea8996ebfbe7d163bae11201dac6e">   77</a></span>&#160;    <a class="code" href="group__CO__NMT__Heartbeat.html#ga1e8c2a6c0fd4a33183503d25a7c6d744">CO_NMT_internalState_t</a> *<a class="code" href="structCO__SYNC__t.html#a70fea8996ebfbe7d163bae11201dac6e">operatingState</a>; </div>
<div class="line"><a name="l00080"></a><span class="lineno"><a class="line" href="structCO__SYNC__t.html#af37a656db91d31a8187e0350f472ea36">   80</a></span>&#160;    <a class="code" href="group__CO__dataTypes.html#ga449976458a084f880dc8e3d29e7eb6f5">bool_t</a>              <a class="code" href="structCO__SYNC__t.html#af37a656db91d31a8187e0350f472ea36">isProducer</a>;</div>
<div class="line"><a name="l00083"></a><span class="lineno"><a class="line" href="structCO__SYNC__t.html#af528cdc487bdaee3dfc0a3baa3f7c7cc">   83</a></span>&#160;    <a class="code" href="group__CO__dataTypes.html#ga1f1825b69244eb3ad2c7165ddc99c956">uint16_t</a>            <a class="code" href="structCO__SYNC__t.html#af528cdc487bdaee3dfc0a3baa3f7c7cc">COB_ID</a>;</div>
<div class="line"><a name="l00086"></a><span class="lineno"><a class="line" href="structCO__SYNC__t.html#a15337541e9b3defa2dbae2df3dd01e72">   86</a></span>&#160;    <a class="code" href="group__CO__dataTypes.html#ga33594304e786b158f3fb30289278f5af">uint32_t</a>            <a class="code" href="structCO__SYNC__t.html#a15337541e9b3defa2dbae2df3dd01e72">periodTime</a>;</div>
<div class="line"><a name="l00089"></a><span class="lineno"><a class="line" href="structCO__SYNC__t.html#a9f612a7f9d691edeef11d8df9cf166a7">   89</a></span>&#160;    <a class="code" href="group__CO__dataTypes.html#ga33594304e786b158f3fb30289278f5af">uint32_t</a>            <a class="code" href="structCO__SYNC__t.html#a9f612a7f9d691edeef11d8df9cf166a7">periodTimeoutTime</a>;</div>
<div class="line"><a name="l00092"></a><span class="lineno"><a class="line" href="structCO__SYNC__t.html#aee5eb3e245e54e509d2f2cc05cf4a664">   92</a></span>&#160;    <a class="code" href="group__CO__dataTypes.html#gaba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>             <a class="code" href="structCO__SYNC__t.html#aee5eb3e245e54e509d2f2cc05cf4a664">counterOverflowValue</a>;</div>
<div class="line"><a name="l00095"></a><span class="lineno"><a class="line" href="structCO__SYNC__t.html#adbc85ba8f5f4cbca0caa645216204a88">   95</a></span>&#160;    <a class="code" href="group__CO__dataTypes.html#ga449976458a084f880dc8e3d29e7eb6f5">bool_t</a>              <a class="code" href="structCO__SYNC__t.html#adbc85ba8f5f4cbca0caa645216204a88">curentSyncTimeIsInsideWindow</a>;</div>
<div class="line"><a name="l00097"></a><span class="lineno"><a class="line" href="structCO__SYNC__t.html#afa9120621a777413be033005eb43e771">   97</a></span>&#160;    <span class="keyword">volatile</span> <span class="keywordtype">void</span>      *<a class="code" href="structCO__SYNC__t.html#afa9120621a777413be033005eb43e771">CANrxNew</a>;</div>
<div class="line"><a name="l00099"></a><span class="lineno"><a class="line" href="structCO__SYNC__t.html#a25aeadeddcae8209b6b18034036a0aaf">   99</a></span>&#160;    <a class="code" href="group__CO__dataTypes.html#ga449976458a084f880dc8e3d29e7eb6f5">bool_t</a>              <a class="code" href="structCO__SYNC__t.html#a25aeadeddcae8209b6b18034036a0aaf">CANrxToggle</a>;</div>
<div class="line"><a name="l00101"></a><span class="lineno"><a class="line" href="structCO__SYNC__t.html#a0977c2f09f69755e4b53df68bb1fee0b">  101</a></span>&#160;    <a class="code" href="group__CO__dataTypes.html#gaba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>             <a class="code" href="structCO__SYNC__t.html#a0977c2f09f69755e4b53df68bb1fee0b">counter</a>;</div>
<div class="line"><a name="l00104"></a><span class="lineno"><a class="line" href="structCO__SYNC__t.html#a491f176a5fb70400647474555628bf6f">  104</a></span>&#160;    <a class="code" href="group__CO__dataTypes.html#ga33594304e786b158f3fb30289278f5af">uint32_t</a>            <a class="code" href="structCO__SYNC__t.html#a491f176a5fb70400647474555628bf6f">timer</a>;</div>
<div class="line"><a name="l00106"></a><span class="lineno"><a class="line" href="structCO__SYNC__t.html#ae108ac75f1fb7c797393646cc6c494af">  106</a></span>&#160;    <a class="code" href="group__CO__dataTypes.html#ga1f1825b69244eb3ad2c7165ddc99c956">uint16_t</a>            <a class="code" href="structCO__SYNC__t.html#ae108ac75f1fb7c797393646cc6c494af">receiveError</a>;</div>
<div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;<span class="preprocessor">#if ((CO_CONFIG_SYNC) &amp; CO_CONFIG_FLAG_CALLBACK_PRE) || defined CO_DOXYGEN</span></div>
<div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160; </div>
<div class="line"><a name="l00109"></a><span class="lineno"><a class="line" href="structCO__SYNC__t.html#ac56a3411d0cd312e51d905937c628b6f">  109</a></span>&#160;    void              (*pFunctSignalPre)(<span class="keywordtype">void</span> *object);</div>
<div class="line"><a name="l00111"></a><span class="lineno"><a class="line" href="structCO__SYNC__t.html#a6a219b1fd9d3382131878af1f016b83d">  111</a></span>&#160;    <span class="keywordtype">void</span>               *<a class="code" href="structCO__SYNC__t.html#a6a219b1fd9d3382131878af1f016b83d">functSignalObjectPre</a>;</div>
<div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00113"></a><span class="lineno"><a class="line" href="structCO__SYNC__t.html#ae799680e430d4d6b05d7a3da216f06be">  113</a></span>&#160;    <a class="code" href="structCO__CANmodule__t.html">CO_CANmodule_t</a>     *<a class="code" href="structCO__SYNC__t.html#ae799680e430d4d6b05d7a3da216f06be">CANdevRx</a>;       </div>
<div class="line"><a name="l00114"></a><span class="lineno"><a class="line" href="structCO__SYNC__t.html#a1a489d5fd447a8b5e16fb82d957d0667">  114</a></span>&#160;    <a class="code" href="group__CO__dataTypes.html#ga1f1825b69244eb3ad2c7165ddc99c956">uint16_t</a>            <a class="code" href="structCO__SYNC__t.html#a1a489d5fd447a8b5e16fb82d957d0667">CANdevRxIdx</a>;    </div>
<div class="line"><a name="l00115"></a><span class="lineno"><a class="line" href="structCO__SYNC__t.html#a3b89fbc55cce155f500bbda463b61d8a">  115</a></span>&#160;    <a class="code" href="structCO__CANmodule__t.html">CO_CANmodule_t</a>     *<a class="code" href="structCO__SYNC__t.html#a3b89fbc55cce155f500bbda463b61d8a">CANdevTx</a>;       </div>
<div class="line"><a name="l00116"></a><span class="lineno"><a class="line" href="structCO__SYNC__t.html#a79d41eeaf724741d0ed281ab3b6a95ef">  116</a></span>&#160;    <a class="code" href="structCO__CANtx__t.html">CO_CANtx_t</a>         *<a class="code" href="structCO__SYNC__t.html#a79d41eeaf724741d0ed281ab3b6a95ef">CANtxBuff</a>;      </div>
<div class="line"><a name="l00117"></a><span class="lineno"><a class="line" href="structCO__SYNC__t.html#ad07d96af0baa18907d4865ecf244d420">  117</a></span>&#160;    <a class="code" href="group__CO__dataTypes.html#ga1f1825b69244eb3ad2c7165ddc99c956">uint16_t</a>            <a class="code" href="structCO__SYNC__t.html#ad07d96af0baa18907d4865ecf244d420">CANdevTxIdx</a>;    </div>
<div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;}<a class="code" href="structCO__SYNC__t.html">CO_SYNC_t</a>;</div>
<div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160; </div>
<div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160; </div>
<div class="line"><a name="l00122"></a><span class="lineno"><a class="line" href="group__CO__SYNC.html#ga121ede6e0c90c66076a7ed950db38517">  122</a></span>&#160;<span class="keyword">typedef</span> <span class="keyword">enum</span> {</div>
<div class="line"><a name="l00123"></a><span class="lineno"><a class="line" href="group__CO__SYNC.html#gga121ede6e0c90c66076a7ed950db38517aeff7846423b9eb92cd2c69df745ea429">  123</a></span>&#160;    <a class="code" href="group__CO__SYNC.html#gga121ede6e0c90c66076a7ed950db38517aeff7846423b9eb92cd2c69df745ea429">CO_SYNC_NONE</a>            = 0, </div>
<div class="line"><a name="l00124"></a><span class="lineno"><a class="line" href="group__CO__SYNC.html#gga121ede6e0c90c66076a7ed950db38517aa03c21a78b503a4adebb2d9d7aa655bf">  124</a></span>&#160;    <a class="code" href="group__CO__SYNC.html#gga121ede6e0c90c66076a7ed950db38517aa03c21a78b503a4adebb2d9d7aa655bf">CO_SYNC_RECEIVED</a>        = 1, </div>
<div class="line"><a name="l00125"></a><span class="lineno"><a class="line" href="group__CO__SYNC.html#gga121ede6e0c90c66076a7ed950db38517a5b112bec6cb10119879703a6313de41e">  125</a></span>&#160;    <a class="code" href="group__CO__SYNC.html#gga121ede6e0c90c66076a7ed950db38517a5b112bec6cb10119879703a6313de41e">CO_SYNC_OUTSIDE_WINDOW</a>  = 2  </div>
<div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160;} <a class="code" href="group__CO__SYNC.html#ga121ede6e0c90c66076a7ed950db38517">CO_SYNC_status_t</a>;</div>
<div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160; </div>
<div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160; </div>
<div class="line"><a name="l00148"></a><span class="lineno">  148</span>&#160;<a class="code" href="group__CO__driver.html#ga1cb2d3466eb0c6d267f3b5ff1a0d9532">CO_ReturnError_t</a> <a class="code" href="group__CO__SYNC.html#ga2e2357b27993f25d09328a677729965f">CO_SYNC_init</a>(</div>
<div class="line"><a name="l00149"></a><span class="lineno">  149</span>&#160;        <a class="code" href="structCO__SYNC__t.html">CO_SYNC_t</a>              *SYNC,</div>
<div class="line"><a name="l00150"></a><span class="lineno">  150</span>&#160;        <a class="code" href="structCO__EM__t.html">CO_EM_t</a>                *em,</div>
<div class="line"><a name="l00151"></a><span class="lineno">  151</span>&#160;        <a class="code" href="structCO__SDOserver__t.html">CO_SDOserver_t</a>         *SDO,</div>
<div class="line"><a name="l00152"></a><span class="lineno">  152</span>&#160;        <a class="code" href="group__CO__NMT__Heartbeat.html#ga1e8c2a6c0fd4a33183503d25a7c6d744">CO_NMT_internalState_t</a> *operatingState,</div>
<div class="line"><a name="l00153"></a><span class="lineno">  153</span>&#160;        <a class="code" href="group__CO__dataTypes.html#ga33594304e786b158f3fb30289278f5af">uint32_t</a>                COB_ID_SYNCMessage,</div>
<div class="line"><a name="l00154"></a><span class="lineno">  154</span>&#160;        <a class="code" href="group__CO__dataTypes.html#ga33594304e786b158f3fb30289278f5af">uint32_t</a>                communicationCyclePeriod,</div>
<div class="line"><a name="l00155"></a><span class="lineno">  155</span>&#160;        <a class="code" href="group__CO__dataTypes.html#gaba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>                 synchronousCounterOverflowValue,</div>
<div class="line"><a name="l00156"></a><span class="lineno">  156</span>&#160;        <a class="code" href="structCO__CANmodule__t.html">CO_CANmodule_t</a>         *CANdevRx,</div>
<div class="line"><a name="l00157"></a><span class="lineno">  157</span>&#160;        <a class="code" href="group__CO__dataTypes.html#ga1f1825b69244eb3ad2c7165ddc99c956">uint16_t</a>                CANdevRxIdx,</div>
<div class="line"><a name="l00158"></a><span class="lineno">  158</span>&#160;        <a class="code" href="structCO__CANmodule__t.html">CO_CANmodule_t</a>         *CANdevTx,</div>
<div class="line"><a name="l00159"></a><span class="lineno">  159</span>&#160;        <a class="code" href="group__CO__dataTypes.html#ga1f1825b69244eb3ad2c7165ddc99c956">uint16_t</a>                CANdevTxIdx);</div>
<div class="line"><a name="l00160"></a><span class="lineno">  160</span>&#160; </div>
<div class="line"><a name="l00161"></a><span class="lineno">  161</span>&#160; </div>
<div class="line"><a name="l00162"></a><span class="lineno">  162</span>&#160;<span class="preprocessor">#if ((CO_CONFIG_SYNC) &amp; CO_CONFIG_FLAG_CALLBACK_PRE) || defined CO_DOXYGEN</span></div>
<div class="line"><a name="l00163"></a><span class="lineno">  163</span>&#160; </div>
<div class="line"><a name="l00174"></a><span class="lineno">  174</span>&#160;<span class="keywordtype">void</span> <a class="code" href="group__CO__SYNC.html#gaf1005766c7f1588262b018fe04960777">CO_SYNC_initCallbackPre</a>(</div>
<div class="line"><a name="l00175"></a><span class="lineno">  175</span>&#160;        <a class="code" href="structCO__SYNC__t.html">CO_SYNC_t</a>              *SYNC,</div>
<div class="line"><a name="l00176"></a><span class="lineno">  176</span>&#160;        <span class="keywordtype">void</span>                   *<span class="keywordtype">object</span>,</div>
<div class="line"><a name="l00177"></a><span class="lineno">  177</span>&#160;        <span class="keywordtype">void</span>                  (*pFunctSignalPre)(<span class="keywordtype">void</span> *<span class="keywordtype">object</span>));</div>
<div class="line"><a name="l00178"></a><span class="lineno">  178</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00179"></a><span class="lineno">  179</span>&#160; </div>
<div class="line"><a name="l00180"></a><span class="lineno">  180</span>&#160; </div>
<div class="line"><a name="l00194"></a><span class="lineno">  194</span>&#160;<a class="code" href="group__CO__SYNC.html#ga121ede6e0c90c66076a7ed950db38517">CO_SYNC_status_t</a> <a class="code" href="group__CO__SYNC.html#ga66b8f42fd430daa2a57ff15aa49c814c">CO_SYNC_process</a>(</div>
<div class="line"><a name="l00195"></a><span class="lineno">  195</span>&#160;        <a class="code" href="structCO__SYNC__t.html">CO_SYNC_t</a>              *SYNC,</div>
<div class="line"><a name="l00196"></a><span class="lineno">  196</span>&#160;        <a class="code" href="group__CO__dataTypes.html#ga33594304e786b158f3fb30289278f5af">uint32_t</a>                timeDifference_us,</div>
<div class="line"><a name="l00197"></a><span class="lineno">  197</span>&#160;        <a class="code" href="group__CO__dataTypes.html#ga33594304e786b158f3fb30289278f5af">uint32_t</a>                ObjDict_synchronousWindowLength,</div>
<div class="line"><a name="l00198"></a><span class="lineno">  198</span>&#160;        <a class="code" href="group__CO__dataTypes.html#ga33594304e786b158f3fb30289278f5af">uint32_t</a>               *timerNext_us);</div>
<div class="line"><a name="l00199"></a><span class="lineno">  199</span>&#160; <span class="comment">/* CO_SYNC */</span></div>
<div class="line"><a name="l00201"></a><span class="lineno">  201</span>&#160; </div>
<div class="line"><a name="l00202"></a><span class="lineno">  202</span>&#160;<span class="preprocessor">#ifdef __cplusplus</span></div>
<div class="line"><a name="l00203"></a><span class="lineno">  203</span>&#160;}</div>
<div class="line"><a name="l00204"></a><span class="lineno">  204</span>&#160;<span class="preprocessor">#endif </span><span class="comment">/*__cplusplus*/</span><span class="preprocessor"></span></div>
<div class="line"><a name="l00205"></a><span class="lineno">  205</span>&#160; </div>
<div class="line"><a name="l00206"></a><span class="lineno">  206</span>&#160;<span class="preprocessor">#endif </span><span class="comment">/* (CO_CONFIG_SYNC) &amp; CO_CONFIG_SYNC_ENABLE */</span><span class="preprocessor"></span></div>
<div class="line"><a name="l00207"></a><span class="lineno">  207</span>&#160; </div>
<div class="line"><a name="l00208"></a><span class="lineno">  208</span>&#160;<span class="preprocessor">#endif </span><span class="comment">/* CO_SYNC_H */</span><span class="preprocessor"></span></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<div class="ttc" id="agroup__CO__dataTypes_html_ga33594304e786b158f3fb30289278f5af"><div class="ttname"><a href="group__CO__dataTypes.html#ga33594304e786b158f3fb30289278f5af">uint32_t</a></div><div class="ttdeci">unsigned long int uint32_t</div><div class="ttdoc">UNSIGNED32 in CANopen (0007h), 32-bit unsigned integer.</div><div class="ttdef"><b>Definition:</b> CO_driver.h:141</div></div>
<div class="ttc" id="aCO__driver_8h_html"><div class="ttname"><a href="CO__driver_8h.html">CO_driver.h</a></div><div class="ttdoc">Interface between CAN hardware and CANopenNode.</div></div>
<div class="ttc" id="astructCO__SYNC__t_html_a15337541e9b3defa2dbae2df3dd01e72"><div class="ttname"><a href="structCO__SYNC__t.html#a15337541e9b3defa2dbae2df3dd01e72">CO_SYNC_t::periodTime</a></div><div class="ttdeci">uint32_t periodTime</div><div class="ttdoc">Sync period time in [microseconds].</div><div class="ttdef"><b>Definition:</b> CO_SYNC.h:86</div></div>
<div class="ttc" id="agroup__CO__SYNC_html_ga66b8f42fd430daa2a57ff15aa49c814c"><div class="ttname"><a href="group__CO__SYNC.html#ga66b8f42fd430daa2a57ff15aa49c814c">CO_SYNC_process</a></div><div class="ttdeci">CO_SYNC_status_t CO_SYNC_process(CO_SYNC_t *SYNC, uint32_t timeDifference_us, uint32_t ObjDict_synchronousWindowLength, uint32_t *timerNext_us)</div><div class="ttdoc">Process SYNC communication.</div></div>
<div class="ttc" id="astructCO__SDOserver__t_html"><div class="ttname"><a href="structCO__SDOserver__t.html">CO_SDOserver_t</a></div><div class="ttdoc">SDO server object.</div><div class="ttdef"><b>Definition:</b> CO_SDOserver.h:439</div></div>
<div class="ttc" id="agroup__CO__SYNC_html_gga121ede6e0c90c66076a7ed950db38517aeff7846423b9eb92cd2c69df745ea429"><div class="ttname"><a href="group__CO__SYNC.html#gga121ede6e0c90c66076a7ed950db38517aeff7846423b9eb92cd2c69df745ea429">CO_SYNC_NONE</a></div><div class="ttdeci">@ CO_SYNC_NONE</div><div class="ttdoc">SYNC not received.</div><div class="ttdef"><b>Definition:</b> CO_SYNC.h:123</div></div>
<div class="ttc" id="agroup__CO__dataTypes_html_ga1f1825b69244eb3ad2c7165ddc99c956"><div class="ttname"><a href="group__CO__dataTypes.html#ga1f1825b69244eb3ad2c7165ddc99c956">uint16_t</a></div><div class="ttdeci">unsigned int uint16_t</div><div class="ttdoc">UNSIGNED16 in CANopen (0006h), 16-bit unsigned integer.</div><div class="ttdef"><b>Definition:</b> CO_driver.h:139</div></div>
<div class="ttc" id="astructCO__SYNC__t_html_a0977c2f09f69755e4b53df68bb1fee0b"><div class="ttname"><a href="structCO__SYNC__t.html#a0977c2f09f69755e4b53df68bb1fee0b">CO_SYNC_t::counter</a></div><div class="ttdeci">uint8_t counter</div><div class="ttdoc">Counter of the SYNC message if counterOverflowValue is different than zero.</div><div class="ttdef"><b>Definition:</b> CO_SYNC.h:101</div></div>
<div class="ttc" id="agroup__CO__SYNC_html_gga121ede6e0c90c66076a7ed950db38517a5b112bec6cb10119879703a6313de41e"><div class="ttname"><a href="group__CO__SYNC.html#gga121ede6e0c90c66076a7ed950db38517a5b112bec6cb10119879703a6313de41e">CO_SYNC_OUTSIDE_WINDOW</a></div><div class="ttdeci">@ CO_SYNC_OUTSIDE_WINDOW</div><div class="ttdoc">SYNC received outside SYNC window.</div><div class="ttdef"><b>Definition:</b> CO_SYNC.h:125</div></div>
<div class="ttc" id="agroup__CO__driver_html_ga1cb2d3466eb0c6d267f3b5ff1a0d9532"><div class="ttname"><a href="group__CO__driver.html#ga1cb2d3466eb0c6d267f3b5ff1a0d9532">CO_ReturnError_t</a></div><div class="ttdeci">CO_ReturnError_t</div><div class="ttdoc">Return values of some CANopen functions.</div><div class="ttdef"><b>Definition:</b> CO_driver.h:455</div></div>
<div class="ttc" id="astructCO__SYNC__t_html_ae799680e430d4d6b05d7a3da216f06be"><div class="ttname"><a href="structCO__SYNC__t.html#ae799680e430d4d6b05d7a3da216f06be">CO_SYNC_t::CANdevRx</a></div><div class="ttdeci">CO_CANmodule_t * CANdevRx</div><div class="ttdoc">From CO_SYNC_init()</div><div class="ttdef"><b>Definition:</b> CO_SYNC.h:113</div></div>
<div class="ttc" id="agroup__CO__dataTypes_html_ga449976458a084f880dc8e3d29e7eb6f5"><div class="ttname"><a href="group__CO__dataTypes.html#ga449976458a084f880dc8e3d29e7eb6f5">bool_t</a></div><div class="ttdeci">unsigned char bool_t</div><div class="ttdoc">Boolean data type for general use.</div><div class="ttdef"><b>Definition:</b> CO_driver.h:127</div></div>
<div class="ttc" id="agroup__CO__SYNC_html_ga121ede6e0c90c66076a7ed950db38517"><div class="ttname"><a href="group__CO__SYNC.html#ga121ede6e0c90c66076a7ed950db38517">CO_SYNC_status_t</a></div><div class="ttdeci">CO_SYNC_status_t</div><div class="ttdoc">Return value for CO_SYNC_process.</div><div class="ttdef"><b>Definition:</b> CO_SYNC.h:122</div></div>
<div class="ttc" id="astructCO__SYNC__t_html_a9f612a7f9d691edeef11d8df9cf166a7"><div class="ttname"><a href="structCO__SYNC__t.html#a9f612a7f9d691edeef11d8df9cf166a7">CO_SYNC_t::periodTimeoutTime</a></div><div class="ttdeci">uint32_t periodTimeoutTime</div><div class="ttdoc">Sync period timeout time in [microseconds].</div><div class="ttdef"><b>Definition:</b> CO_SYNC.h:89</div></div>
<div class="ttc" id="astructCO__SYNC__t_html_a79d41eeaf724741d0ed281ab3b6a95ef"><div class="ttname"><a href="structCO__SYNC__t.html#a79d41eeaf724741d0ed281ab3b6a95ef">CO_SYNC_t::CANtxBuff</a></div><div class="ttdeci">CO_CANtx_t * CANtxBuff</div><div class="ttdoc">CAN transmit buffer inside CANdevTx.</div><div class="ttdef"><b>Definition:</b> CO_SYNC.h:116</div></div>
<div class="ttc" id="agroup__CO__SYNC_html_gaf1005766c7f1588262b018fe04960777"><div class="ttname"><a href="group__CO__SYNC.html#gaf1005766c7f1588262b018fe04960777">CO_SYNC_initCallbackPre</a></div><div class="ttdeci">void CO_SYNC_initCallbackPre(CO_SYNC_t *SYNC, void *object, void(*pFunctSignalPre)(void *object))</div><div class="ttdoc">Initialize SYNC callback function.</div></div>
<div class="ttc" id="agroup__CO__SYNC_html_gga121ede6e0c90c66076a7ed950db38517aa03c21a78b503a4adebb2d9d7aa655bf"><div class="ttname"><a href="group__CO__SYNC.html#gga121ede6e0c90c66076a7ed950db38517aa03c21a78b503a4adebb2d9d7aa655bf">CO_SYNC_RECEIVED</a></div><div class="ttdeci">@ CO_SYNC_RECEIVED</div><div class="ttdoc">SYNC received.</div><div class="ttdef"><b>Definition:</b> CO_SYNC.h:124</div></div>
<div class="ttc" id="astructCO__SYNC__t_html_aee5eb3e245e54e509d2f2cc05cf4a664"><div class="ttname"><a href="structCO__SYNC__t.html#aee5eb3e245e54e509d2f2cc05cf4a664">CO_SYNC_t::counterOverflowValue</a></div><div class="ttdeci">uint8_t counterOverflowValue</div><div class="ttdoc">Value from Synchronous counter overflow value variable from Object dictionary (index 0x1019)</div><div class="ttdef"><b>Definition:</b> CO_SYNC.h:92</div></div>
<div class="ttc" id="astructCO__SYNC__t_html_ae108ac75f1fb7c797393646cc6c494af"><div class="ttname"><a href="structCO__SYNC__t.html#ae108ac75f1fb7c797393646cc6c494af">CO_SYNC_t::receiveError</a></div><div class="ttdeci">uint16_t receiveError</div><div class="ttdoc">Set to nonzero value, if SYNC with wrong data length is received from CAN.</div><div class="ttdef"><b>Definition:</b> CO_SYNC.h:106</div></div>
<div class="ttc" id="astructCO__SYNC__t_html_a25aeadeddcae8209b6b18034036a0aaf"><div class="ttname"><a href="structCO__SYNC__t.html#a25aeadeddcae8209b6b18034036a0aaf">CO_SYNC_t::CANrxToggle</a></div><div class="ttdeci">bool_t CANrxToggle</div><div class="ttdoc">Variable toggles, if new SYNC message received from CAN bus.</div><div class="ttdef"><b>Definition:</b> CO_SYNC.h:99</div></div>
<div class="ttc" id="astructCO__SYNC__t_html_a491f176a5fb70400647474555628bf6f"><div class="ttname"><a href="structCO__SYNC__t.html#a491f176a5fb70400647474555628bf6f">CO_SYNC_t::timer</a></div><div class="ttdeci">uint32_t timer</div><div class="ttdoc">Timer for the SYNC message in [microseconds].</div><div class="ttdef"><b>Definition:</b> CO_SYNC.h:104</div></div>
<div class="ttc" id="agroup__CO__SYNC_html_ga2e2357b27993f25d09328a677729965f"><div class="ttname"><a href="group__CO__SYNC.html#ga2e2357b27993f25d09328a677729965f">CO_SYNC_init</a></div><div class="ttdeci">CO_ReturnError_t CO_SYNC_init(CO_SYNC_t *SYNC, CO_EM_t *em, CO_SDOserver_t *SDO, CO_NMT_internalState_t *operatingState, uint32_t COB_ID_SYNCMessage, uint32_t communicationCyclePeriod, uint8_t synchronousCounterOverflowValue, CO_CANmodule_t *CANdevRx, uint16_t CANdevRxIdx, CO_CANmodule_t *CANdevTx, uint16_t CANdevTxIdx)</div><div class="ttdoc">Initialize SYNC object.</div></div>
<div class="ttc" id="astructCO__SYNC__t_html_af528cdc487bdaee3dfc0a3baa3f7c7cc"><div class="ttname"><a href="structCO__SYNC__t.html#af528cdc487bdaee3dfc0a3baa3f7c7cc">CO_SYNC_t::COB_ID</a></div><div class="ttdeci">uint16_t COB_ID</div><div class="ttdoc">COB_ID of SYNC message.</div><div class="ttdef"><b>Definition:</b> CO_SYNC.h:83</div></div>
<div class="ttc" id="astructCO__SYNC__t_html_adbc85ba8f5f4cbca0caa645216204a88"><div class="ttname"><a href="structCO__SYNC__t.html#adbc85ba8f5f4cbca0caa645216204a88">CO_SYNC_t::curentSyncTimeIsInsideWindow</a></div><div class="ttdeci">bool_t curentSyncTimeIsInsideWindow</div><div class="ttdoc">True, if current time is inside synchronous window.</div><div class="ttdef"><b>Definition:</b> CO_SYNC.h:95</div></div>
<div class="ttc" id="astructCO__EM__t_html"><div class="ttname"><a href="structCO__EM__t.html">CO_EM_t</a></div><div class="ttdoc">Emergency object.</div><div class="ttdef"><b>Definition:</b> CO_Emergency.h:369</div></div>
<div class="ttc" id="agroup__CO__NMT__Heartbeat_html_ga1e8c2a6c0fd4a33183503d25a7c6d744"><div class="ttname"><a href="group__CO__NMT__Heartbeat.html#ga1e8c2a6c0fd4a33183503d25a7c6d744">CO_NMT_internalState_t</a></div><div class="ttdeci">CO_NMT_internalState_t</div><div class="ttdoc">Internal network state of the CANopen node.</div><div class="ttdef"><b>Definition:</b> CO_NMT_Heartbeat.h:78</div></div>
<div class="ttc" id="astructCO__SYNC__t_html_af37a656db91d31a8187e0350f472ea36"><div class="ttname"><a href="structCO__SYNC__t.html#af37a656db91d31a8187e0350f472ea36">CO_SYNC_t::isProducer</a></div><div class="ttdeci">bool_t isProducer</div><div class="ttdoc">True, if device is SYNC producer.</div><div class="ttdef"><b>Definition:</b> CO_SYNC.h:80</div></div>
<div class="ttc" id="astructCO__SYNC__t_html_afa9120621a777413be033005eb43e771"><div class="ttname"><a href="structCO__SYNC__t.html#afa9120621a777413be033005eb43e771">CO_SYNC_t::CANrxNew</a></div><div class="ttdeci">volatile void * CANrxNew</div><div class="ttdoc">Indicates, if new SYNC message received from CAN bus.</div><div class="ttdef"><b>Definition:</b> CO_SYNC.h:97</div></div>
<div class="ttc" id="astructCO__SYNC__t_html_a6a219b1fd9d3382131878af1f016b83d"><div class="ttname"><a href="structCO__SYNC__t.html#a6a219b1fd9d3382131878af1f016b83d">CO_SYNC_t::functSignalObjectPre</a></div><div class="ttdeci">void * functSignalObjectPre</div><div class="ttdoc">From CO_SYNC_initCallbackPre() or NULL.</div><div class="ttdef"><b>Definition:</b> CO_SYNC.h:111</div></div>
<div class="ttc" id="astructCO__CANmodule__t_html"><div class="ttname"><a href="structCO__CANmodule__t.html">CO_CANmodule_t</a></div><div class="ttdoc">Complete CAN module object.</div><div class="ttdef"><b>Definition:</b> CO_driver.h:305</div></div>
<div class="ttc" id="astructCO__SYNC__t_html_acf987cc40eb5f005a92f10210353ea1f"><div class="ttname"><a href="structCO__SYNC__t.html#acf987cc40eb5f005a92f10210353ea1f">CO_SYNC_t::em</a></div><div class="ttdeci">CO_EM_t * em</div><div class="ttdoc">From CO_SYNC_init()</div><div class="ttdef"><b>Definition:</b> CO_SYNC.h:76</div></div>
<div class="ttc" id="astructCO__SYNC__t_html_a3b89fbc55cce155f500bbda463b61d8a"><div class="ttname"><a href="structCO__SYNC__t.html#a3b89fbc55cce155f500bbda463b61d8a">CO_SYNC_t::CANdevTx</a></div><div class="ttdeci">CO_CANmodule_t * CANdevTx</div><div class="ttdoc">From CO_SYNC_init()</div><div class="ttdef"><b>Definition:</b> CO_SYNC.h:115</div></div>
<div class="ttc" id="astructCO__SYNC__t_html"><div class="ttname"><a href="structCO__SYNC__t.html">CO_SYNC_t</a></div><div class="ttdoc">SYNC producer and consumer object.</div><div class="ttdef"><b>Definition:</b> CO_SYNC.h:75</div></div>
<div class="ttc" id="astructCO__SYNC__t_html_a1a489d5fd447a8b5e16fb82d957d0667"><div class="ttname"><a href="structCO__SYNC__t.html#a1a489d5fd447a8b5e16fb82d957d0667">CO_SYNC_t::CANdevRxIdx</a></div><div class="ttdeci">uint16_t CANdevRxIdx</div><div class="ttdoc">From CO_SYNC_init()</div><div class="ttdef"><b>Definition:</b> CO_SYNC.h:114</div></div>
<div class="ttc" id="astructCO__SYNC__t_html_a70fea8996ebfbe7d163bae11201dac6e"><div class="ttname"><a href="structCO__SYNC__t.html#a70fea8996ebfbe7d163bae11201dac6e">CO_SYNC_t::operatingState</a></div><div class="ttdeci">CO_NMT_internalState_t * operatingState</div><div class="ttdoc">From CO_SYNC_init()</div><div class="ttdef"><b>Definition:</b> CO_SYNC.h:77</div></div>
<div class="ttc" id="astructCO__CANtx__t_html"><div class="ttname"><a href="structCO__CANtx__t.html">CO_CANtx_t</a></div><div class="ttdoc">Configuration object for CAN transmit message for specific CANopenNode Object.</div><div class="ttdef"><b>Definition:</b> CO_driver.h:285</div></div>
<div class="ttc" id="agroup__CO__dataTypes_html_gaba7bc1797add20fe3efdf37ced1182c5"><div class="ttname"><a href="group__CO__dataTypes.html#gaba7bc1797add20fe3efdf37ced1182c5">uint8_t</a></div><div class="ttdeci">unsigned char uint8_t</div><div class="ttdoc">UNSIGNED8 in CANopen (0005h), 8-bit unsigned integer.</div><div class="ttdef"><b>Definition:</b> CO_driver.h:137</div></div>
<div class="ttc" id="astructCO__SYNC__t_html_ad07d96af0baa18907d4865ecf244d420"><div class="ttname"><a href="structCO__SYNC__t.html#ad07d96af0baa18907d4865ecf244d420">CO_SYNC_t::CANdevTxIdx</a></div><div class="ttdeci">uint16_t CANdevTxIdx</div><div class="ttdoc">From CO_SYNC_init()</div><div class="ttdef"><b>Definition:</b> CO_SYNC.h:117</div></div>
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_f17b92000dd778003adbbcb6b5ce4226.html">301</a></li><li class="navelem"><a class="el" href="CO__SYNC_8h.html">CO_SYNC.h</a></li>
    <li class="footer">Generated on Sat Sep 19 2020 10:03:20 for CANopenNode by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.17 </li>
  </ul>
</div>
</body>
</html>
